#!/bin/sh
TMPDIR=/usr/local/src/eclipse

if [ ! -e ${TMPDIR} ];
then
    cd /usr/local/src
    if [ "`uname -m`" = "x86_64" ]; then
	wget http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/helios/SR1/eclipse-jee-helios-SR1-linux-gtk-x86_64.tar.gz
	tar xzf eclipse-jee-helios-SR1-linux-gtk-x86_64.tar.gz
    else
	wget http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/helios/SR1/eclipse-jee-helios-SR1-linux-gtk.tar.gz
	tar xzf eclipse-jee-helios-SR1-linux-gtk.tar.gz
    fi

    cd $TMPDIR
    wget http://www.openrtm.org/pub/OpenRTM-aist/tools/1.1.0/rtmtools110-rc1_ja.zip
    unzip rtmtools110-rc1_ja.zip

    sudo cat <<EOF >> $HOME/.bashrc.rtm

#for eclipse
alias eclipse="/usr/local/src/eclipse/eclipse"
EOF
fi


